package com.craney.testHit
{
	import flash.display.Shape;
	import flash.display.Sprite;
	import flash.events.Event;
	
	public class EveryFrame
	{
		private var parentSprite:Sprite;
		
		private var circle:Shape = new Shape();
		
		public function EveryFrame(sp:Sprite)
		{
			parentSprite = sp;
			
			circle.graphics.beginFill(0xffcc00);
			circle.graphics.drawCircle(30, 30, 50);
			circle.graphics.endFill();
			circle.name = "圆";
			parentSprite.addEventListener(Event.ENTER_FRAME, everyFrameHandler);
			
			parentSprite.addChild(circle);
		}
		
		private function everyFrameHandler(evt:Event):void
		{
			
			trace(evt.target.name);
			trace(evt.target);
			circle.x += 5;
		}
		
		

	}
}